package cn.example.demo.modules.sys.model.dto;

import cn.example.demo.common.tools.obj.reflect.Immutable;
import cn.example.demo.common.validation.groups.Batch;
import cn.example.demo.common.validation.groups.Delete;
import cn.example.demo.common.validation.groups.Insert;
import cn.example.demo.common.validation.groups.Update;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.*;

import javax.persistence.Column;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <p>
 * 角色结构体 DTO
 * </p>
 *
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysRoleDto {
    @NotNull(message = "角色主键不能为空！", groups = Update.class)
    private Integer roleId;    // 主键
    @NotNull(message = "角色名称不能为空！", groups = Insert.class)
    private String role;    // 角色名
    private String description; // 描述信息
    private Short status = 1;   // {1:正常, 0:禁用, -1:删除标记}

    @NotBlank(message = "数据域配置不能为空！", groups = Batch.class)
    private String dataScope;   // 数据范围

    @NotEmpty(message = "IDs不能为空集！", groups = {Batch.class})
    private List<Integer> ids;
}
